package org.s.com.springioc2.model;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class BeanCofig {
    @Primary
    @Bean
    public UserInfo userInfo1(){
        return new UserInfo("张三");
    }
    @Bean
    public UserInfo userInfo2(){
        return new UserInfo("李四");
    }
}
